﻿


CREATE PROCEDURE [dbo].[proc_Users_Update]
	(
		@Type int,
		@UserId int,
		@Name nvarchar(50),
		@CompanyId int,
		@DepartmentId int,
		@Email nvarchar(50),
		@RTX nvarchar(50),
		@IsLockout bit,
		@UserInRoles nvarchar(2000)
	)
AS
begin
if(@Type=1)
begin
	Update aspnet_Users Set
	RTX=@RTX,
	Email=@Email,
	CompanyId=@CompanyId,
	DepartmentId=@DepartmentId,
	[Name]=@Name,
	IsLockout=@IsLockout
	Where UserId=@UserId
end
else
begin
	Update aspnet_Users Set
	UserInRoles=@UserInRoles
	Where UserId=@UserId
end
	--XFL Edit
--select top 100 * from aspnet_Users
end
	RETURN


